﻿@model CloudFranceTriple.Models.PollSet

@{
    ViewBag.Title = CloudFranceTriple.WebRole.Properties.Resources.PollResultsTitle;
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="content-padding">
    <h1>
        @CloudFranceTriple.WebRole.Properties.Resources.PollResultsTitle
    </h1>
    <section>
        <fieldset>
            <legend>@CloudFranceTriple.WebRole.Properties.Resources.PollResultsTitle</legend>

            <div class="display-label">
                @CloudFranceTriple.WebRole.Properties.Resources.TopicLabel
            </div>
            <div class="display-field">
                @Html.DisplayFor(model => model.ForumTopicSet.LabelForumTopic)
            </div>

            <table style="border: 1px solid #fffffe; width: 300px;">
                <tr>
                    <td>
                        @Html.HiddenFor(model => model.OrderPoll)
                        <div class="poll-label">
                            @CloudFranceTriple.WebRole.Properties.Resources.PollLabel
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-field">
                            @Html.DisplayFor(model => model.LabelPoll)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 0; margin: 0;">
                        @Html.Action("Index", "PollAnswer", new { area = "Forum", id = Model.Id })
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-label">
                            @CloudFranceTriple.WebRole.Properties.Resources.PollDescription
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-field">
                            @Html.DisplayTextFor(model => model.DescriptionPoll)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-label">
                            @CloudFranceTriple.WebRole.Properties.Resources.PollCreationDate
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-field">
                            @Html.DisplayFor(model => model.CreationDatePoll, "TemplateUserDate")
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-label">
                            @CloudFranceTriple.WebRole.Properties.Resources.PollUntilDate
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-field">
                            @Model.CreationDatePoll.AddDays(Model.DurationInDays).ToShortDateString()
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-label">
                            @CloudFranceTriple.WebRole.Properties.Resources.PollIsPublicPollResult
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="poll-field">
                            @Html.DisplayFor(model => model.IsPublicPollResult)
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        @if (ViewBag.IsAuthor == true)
                        {
                            //ForumTopic_Id: @Html.DisplayFor(modelItem => item.ForumTopic_Id)
                            //<br />
                            @Html.ActionLink(CloudFranceTriple.WebRole.Properties.Resources.ButtonEdit, "Edit", "Poll", new { id = Model.Id, area = "Forum" }, null)
                            @Html.ActionLink(CloudFranceTriple.WebRole.Properties.Resources.ButtonDelete, "Delete", "Poll", new { id = Model.Id, area = "Forum" }, null)
                        }
                    </td>
                </tr>
            </table>
        </fieldset>
        @Html.Partial("_PollBackToPostListByTopic")
    </section>
</div>
